<?php 
$total = count($adc->getAdTypes());
if($total > 0)
{
	?>
    <div class="grid_16">
		<ul class="nav nav-tabs">
			<li class="active">
			<a href="#">Home</a>
			</li>
			<li><a href="#">...</a></li>
			<li><a href="#">...</a></li>
		</ul>
    <table class="adtypes" style="width: 100%;" border="0">
		<tbody>
        	<tr>
            	<td></td>
				<?php 
				$i=1;
                foreach($adc->getAdTypes() as $type)
                {
					if($type->getActive() > 0)
					{
						if(($katana->getId() == 23) && ($type->getId() < 5))
						{
							$link = '/adtype/'.$type->getId().'/';
							if(intval($_GET['bt']) > 0)
							{ $link .= '?bt='.intval($_GET['bt']); }
							echo '<td align="center">';
							echo '<div class="adType">';
							echo 	'<a href="'.$link.'"><img width="128" title="'.$type->getTitle().'" src="'.$type->getImageUrl().'" alt="'.$type->getTitle().'" title="'.$type->getTitle().'" /></a>';
							echo 	'<div class="center">';
							echo 	'<h3><a href="'.$link.'">'.$type->getTitle().'</a></h3>';
							echo 	'</div>';
							echo '</div>';
							echo '</td>';
							if(($i % $rows) == 0)
							{ echo '<td></td></tr><tr><td></td>'; }
							$i++;
						}
					}
                }
                ?>
            </tr>
        </tbody>
    </table>
	<div class="v-space"></div><hr /><div class="v-space"></div>
    </div>
	<?php
}
?>